<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\NodeModel */
/* @var $form ActiveForm */
?>

<div class="add">
<div class="centercontent">
    <?php $form = ActiveForm::begin(); ?>
<span class="field">
权限名称：<?= Html::input('text', 'node_name', '', ['class' => 'node_name','width'=>'10px','size'=>'10px']) ?>
</span><br/>
<span class="field">
所属权限：<br/><select name="node_pid" id="node_pid"><option value="0">顶级权限</option>
<?php foreach ($data as $key => $value) { ?>
<option value="<?= $value['node_id']?>"><?= str_repeat('---', $value['lavel']).$value['node_name'];?></option>
<?php } ?>
</select>
</span><br/>
<span class="field">
控制器名称： <?= Html::input('text', 'node_controller', '', ['class' => 'node_name','width'=>'10px','size'=>'10px']) ?>
</span><br/>
<span class="field">
方法名称： <?= Html::input('text', 'node_method', '', ['class' => 'node_method','width'=>'10px','size'=>'10px']) ?>
</span><br/>   
<span class="field">
是否开启：<?= Html::checkbox('text', 'node_status', '', ['class' => 'node_name','width'=>'10px','size'=>'10px']) ?>
<input type="hidden" value="" name="parentid">
</span>  
<span class="field">
       <div class="form-group">
            <?= Html::submitButton('添加权限', ['class' => 'btn btn-primary']) ?>
        </div>
    <?php ActiveForm::end(); ?>
    </span>  
</div>
</div><!-- add -->
